//
//  LXSDebugLog.swift
//  FrameProduct
//
//  Created by delegate on 2024/2/3.
//

import Foundation
/*
 由于Swift没有宏的概念, 所以 要使用#if DEBUG 需要在
 TARGET -> Build Setting -> Other Swift Flags的Debug状态加一个  -D DEBUG
 */
public func debugLog<T>(_ message: T, fileName: String = #file, methodName: String = #function, lineNumber: Int = #line)
{
    
    #if DEBUG
    let fName = ((fileName as NSString).pathComponents.last!)
    let log = "\(fName).\(methodName)[\(lineNumber)]: \(message)"
    print(log)
    
    #endif
}
